// import { from } from 'core-js/fn/array'
import Vue from 'vue'
import Vuex from 'vuex'
import { getItem, setItem } from "@/utils/localStorag"

Vue.use(Vuex)

const user = "user-Kone"
export default new Vuex.Store({
  state: {
    user:getItem(user)
    // JSON.parse(window.localStorage.getItem('user'))
  },
  mutations: {
    setUser(state,data){
      state.user = data
      // window.localStorage.setItem('user',JSON.stringify(state.user))
      setItem(user,state.user)

    }
  },
  actions: {
  },
  modules: {
  }
})
